<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>HUI</title>
<link rel="stylesheet" type="text/css" href="../css/hui.css" />
</head>
<body>
<header class="hui-header">
    <div id="hui-back"></div>
    <h1>HUI 隐藏或展示元素</h1>
</header>
<div class="hui-wrap">
	<div class="hui-common-title" style="margin-top:15px;">
		<div class="hui-common-title-line"></div>
		<div class="hui-common-title-txt">隐藏或展示元素</div>
		<div class="hui-common-title-line"></div>
	</div>
	<div id="demo1" style="width:90%; margin:12px auto; background:#3388FF; text-align:center; line-height:120px; font-size:20px; color:#FFFFFF;">
		hcoder.net
	</div>
	<div style="width:90%; margin:0px auto;">
		<button type="button" class="hui-button hui-button-large">隐藏</button>
	</div>
</div>
<script src="../js/hui.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
hui('button').eq(0).click(function(){
	var dom = hui('#demo1');
	//判断元素是否展示 isShow - 判断元素是否展示 isHide 判断元素是否隐藏
	if(dom.isShow()){
		dom.hide();
		hui(this).html('展示');
	}else{
		dom.show();
		hui(this).html('隐藏');
	}
});
</script>
</body>
</html>